package com.xdb.sqlparser.dialect.oracle.ast.statement;

import java.util.ArrayList;
import java.util.List;

import com.xdb.sqlparser.ast.SQLExpr;
import com.xdb.sqlparser.ast.SQLName;
import com.xdb.sqlparser.ast.statement.SQLPrimaryKey;
import com.xdb.sqlparser.ast.statement.SQLTableElement;
import com.xdb.sqlparser.dialect.oracle.ast.OracleSQLObjectImpl;
import com.xdb.sqlparser.dialect.oracle.visitor.OracleASTVisitor;

public class OraclePrimaryKey extends OracleSQLObjectImpl implements OracleConstraint, SQLPrimaryKey, SQLTableElement {

	private SQLName name;
	private List<SQLExpr> columns = new ArrayList<SQLExpr>();

	private OracleUsingIndexClause using;
	private SQLName exceptionsInto;
	private Boolean enable;
	private Initially initially;
	private Boolean deferrable;

	@Override
	public void accept0(OracleASTVisitor visitor) {
		if (visitor.visit(this)) {
			acceptChild(visitor, name);
			acceptChild(visitor, columns);
			acceptChild(visitor, using);
			acceptChild(visitor, exceptionsInto);
		}
		visitor.endVisit(this);
	}

	public Boolean getDeferrable() {
		return deferrable;
	}

	public void setDeferrable(Boolean deferrable) {
		this.deferrable = deferrable;
	}

	public SQLName getName() {
		return name;
	}

	public void setName(SQLName name) {
		this.name = name;
	}

	public List<SQLExpr> getColumns() {
		return columns;
	}

	public void setColumns(List<SQLExpr> columns) {
		this.columns = columns;
	}

	public OracleUsingIndexClause getUsing() {
		return using;
	}

	public void setUsing(OracleUsingIndexClause using) {
		this.using = using;
	}

	public SQLName getExceptionsInto() {
		return exceptionsInto;
	}

	public void setExceptionsInto(SQLName exceptionsInto) {
		this.exceptionsInto = exceptionsInto;
	}

	public Boolean getEnable() {
		return enable;
	}

	public void setEnable(Boolean enable) {
		this.enable = enable;
	}

	public Initially getInitially() {
		return initially;
	}

	public void setInitially(Initially initially) {
		this.initially = initially;
	}

}
